import amesu from "../model/bot/amesu";
import bot from "../model/bot/amesu";
import browser, { tempDir } from "../model/browser/browser";
import func from "../model/func";
import { MsgAction, Tpl_propDefault_look } from "../shared/master/MsgAction";
import { style_default } from "../style/default";
/**
 * 道具查看模板
 * @param d 
 */
export default async function (d: MsgAction) {
    let data = d.data as Tpl_propDefault_look;

    const propTypeInfo = func.getPropType(data.type)

    let png = await browser.render(tempDir.道具模板, {
        name:data.name,
        from:data.from,
        typeName:propTypeInfo.name,
        // icon:data.icon,
        score:data.score ? func.BN(data.score) : "未知",
        desc:data.decs,
        tips_1:`${data.instruct || '使用 + ID c 数量'}`,
        tips_2:`${data.instruct_tips || '使用1c10'}`
    })
    amesu.sendLocaImage(d.tolocation, png);
    return png
}